package com.evan.designpatterns.prototype.simple;

import java.util.Arrays;

/**
 * @author :liujiapeng01
 * @date :2019-03-14 13:01
 **/
public class Test {
    public static void main(String[] args) {
        Prototype concretePrototypeA = new ConcretePrototypeA("tom", 12, Arrays.asList("tom", "evan"));
        ConcretePrototypeA prototype1 = (ConcretePrototypeA) new Client(concretePrototypeA).cloneNew();
        ConcretePrototypeA prototype2 = (ConcretePrototypeA) new Client(concretePrototypeA).cloneNew();

        System.out.println(prototype1==prototype2);
        System.out.println(prototype1.getName()==prototype2.getName());
        System.out.println(prototype1.getAge()==prototype2.getAge());
        System.out.println(prototype1.getList()==prototype2.getList());



    }
}
